const db = require('../database/mysql');
//获取文章分类
exports.getArticleCate = (req,res)=>{
    const sqlstr = 'SELECT * FROM en_article_cate';
    db.query(sqlstr,(err,result)=>{
        if(err){
            return res.cc("获取文章列表失败！",1);
        }else if(result.affectedRows!==0){
            res.send({
                status:200,
                msg:"获取文章列表分类成功！",
                data:result,
            });
        }else{
            return res.cc(err);
        }
    });
};